
import javax.swing.JPanel;
import java.awt.Image;
import java.awt.Graphics;
import java.awt.Dimension;
import java.awt.MediaTracker;
import java.net.URL;
import javax.swing.ImageIcon;

public class JPanelImageBg extends JPanel {

	Image background_;
	FenetreLancement container_;
	MediaTracker mTrack_;

	public JPanelImageBg(FenetreLancement tf){
		container_ = tf;
		URL backgroundURL = this.getClass().getResource("background.jpg");
                background_ = new ImageIcon(backgroundURL).getImage();
                //setPreferredSize(new Dimension(495,320));
                this.repaint();
                //g.drawImage(background_,0,0,this);
	}

	public void paint(Graphics g){
		 g.drawImage(background_,0,0,this);
	}

}